﻿'Params
'user (Required) : The last.fm username to fetch the recent tracks of.
'limit (Optional) : The number of results to fetch per page. Defaults to 50. Maximum is 200.
'page (Optional) : The page number to fetch. Defaults to first page.
'to (Optional) : End timestamp of a range - only display scrobbles before this time, in UNIX timestamp format (integer number of seconds since 00:00:00, January 1st 1970 UTC). This must be in the UTC time zone.
'from (Optional) : Beginning timestamp of a range - only display scrobbles after this time, in UNIX timestamp format (integer number of seconds since 00:00:00, January 1st 1970 UTC). This must be in the UTC time zone.
'api_key (Required) : A Last.fm API key.

'Auth
' This service does not require authentication. 

Public Class UserGetRecentTracks
    Inherits BaseRequest

    Dim user As String = ""
    Dim to_ As String = ""
    Dim from_ As String = ""
    Dim page As String = ""
    Dim limit As String = ""

	Public xmlresponse As XDocument = Nothing

    Public Sub New(user As String, to_ As String, from_ As String)
        Me.user = user
        Me.from_ = from_
        Me.to_ = to_
        Me.page = page
        Me.limit = limit
    End Sub

	Public Sub sendRequest()
        InitializeMembers("user.getRecentTracks")

        AddMember("user", user, True)
        AddMember("to", to_, False)
        AddMember("from", from_, False)
        AddMember("page", page, False)
        AddMember("limit", limit, False)
        AddMember("api_key", My.Settings.api_key, False)

        xmlresponse = sendPOSTResponse()
	End Sub

	'	Public Function getResponse() As AlbumGetInfoResponse
	'	Dim response As New AlbumGetInfoResponse
	'		response.album = New Album(xmlresponse.<lfm>.<album>.First)
	'		Return response
	'	End Function
End Class
